Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix potential for user-agent lang value mismatch in tests #2888

Merged
merged 3 commits into from
Nov 6, 2024

Conversation

lucix-aws
Copy link
Contributor

@lucix-aws lucix-aws commented Nov 5, 2024

runtime.Version() may have extra data after the semver string that tests weren't accounting for (they were not normalizing it in the "expect" input, this fixes that)

@lucix-aws lucix-aws requested a review from a team as a code owner November 5, 2024 19:48
@Madrigal
Copy link
Contributor

Madrigal commented Nov 5, 2024

LGTM, just 2 nits

  1. Can we describe better what the actual issue with this was on the PR? offline there was a good explanation of it
  2. The current error message is rather unhelpful

t.Error("User-Agent did not match expected")

Can we change the error message to

t.Error("User-Agent %v did not match expected %v", ua[0], c.Expect)

@lucix-aws
Copy link
Contributor Author

Fixed, merge on CI pass.

@lucix-aws lucix-aws merged commit 82897be into main Nov 6, 2024
13 checks passed
@lucix-aws lucix-aws deleted the fix-useragenttest branch November 6, 2024 01:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants